#计算小数的全部数字的和,并将该数按顺序输出
def point_sum(num):
    string = ''
    while int(num) >= 1:
        num /=10
    sum = 0
    while num != int(num):
        num *= 10
        a = int(num) % 10
        sum += a
        string = string + str(a) + " "
    # string = string.strip()
    string = string[0:len(string)-1]
    return sum,string

# x,y=point_sum(123.4567)
# print(x,y)

result = point_sum(123.4567)
print(result[0],result[1])